[gd_scene load_steps=17 format=3 uid="uid://cb50gn81bw4j2"]

[ext_resource type="Script" path="res://Scenes/Player.gd" id="1_p2x45"]
[ext_resource type="PackedScene" uid="uid://cn1y8s8an0vb6" path="res://Blender/Pistol.blend" id="2_ujq2c"]
[ext_resource type="Texture2D" uid="uid://bkxihylqmr282" path="res://addons/kenney_particle_pack/star_06.png" id="3_geobb"]

[sub_resource type="CapsuleMesh" id="CapsuleMesh_pemon"]

[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jf16n"]

[sub_resource type="Gradient" id="Gradient_wxfdt"]
offsets = PackedFloat32Array(0, 0.355072, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_xaxra"]
gradient = SubResource("Gradient_wxfdt")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_nrd0t"]
gravity = Vector3(0, 0, 0)
angle_min = 45.0
angle_max = 45.0
color_ramp = SubResource("GradientTexture1D_xaxra")

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_r7ggl"]
transparency = 1
shading_mode = 0
vertex_color_use_as_albedo = true
albedo_color = Color(0.768627, 0.647059, 0.537255, 1)
albedo_texture = ExtResource("3_geobb")
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false

[sub_resource type="PlaneMesh" id="PlaneMesh_1abfn"]
material = SubResource("StandardMaterial3D_r7ggl")
size = Vector2(1, 1)
orientation = 2

[sub_resource type="Animation" id="Animation_ofpdk"]
resource_name = "Idle"
length = 3.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D/Pistol:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.5),
"transitions": PackedFloat32Array(-2, -2),
"update": 0,
"values": [Vector3(0.6, -0.3, -0.6), Vector3(0.6, -0.369181, -0.6)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera3D/Pistol:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1.5),
"transitions": PackedFloat32Array(-2, -2),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(-0.122173, 0, 0)]
}

[sub_resource type="Animation" id="Animation_kwdjo"]
resource_name = "Move"
loop_mode = 1
step = 0.25
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D/Pistol:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.25, 0.5, 0.75),
"transitions": PackedFloat32Array(0.5, 2, 0.5, 2),
"update": 0,
"values": [Vector3(0.6, -0.3, -0.6), Vector3(0.520156, -0.269624, -0.6), Vector3(0.6, -0.3, -0.6), Vector3(0.655572, -0.25586, -0.6)]
}

[sub_resource type="Animation" id="Animation_4hno0"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D/Pistol:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.6, -0.3, -0.6)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera3D/Pistol:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}

[sub_resource type="Animation" id="Animation_4bfe4"]
resource_name = "Shoot"
length = 0.4
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D/Pistol:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.4),
"transitions": PackedFloat32Array(0.5, 1),
"update": 0,
"values": [Vector3(0.6, -0.205509, -0.522155), Vector3(0.6, -0.3, -0.6)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera3D/Pistol:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.4),
"transitions": PackedFloat32Array(0.5, 1),
"update": 0,
"values": [Vector3(0.337965, 0, 0), Vector3(0, 0, 0)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_djigl"]
_data = {
"Idle": SubResource("Animation_ofpdk"),
"Move": SubResource("Animation_kwdjo"),
"RESET": SubResource("Animation_4hno0"),
"Shoot": SubResource("Animation_4bfe4")
}

[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_r56ex"]
properties/0/path = NodePath(".:position")
properties/0/spawn = true
properties/0/sync = true
properties/1/path = NodePath(".:rotation")
properties/1/spawn = true
properties/1/sync = true
properties/2/path = NodePath("Camera3D:rotation")
properties/2/spawn = true
properties/2/sync = true

[node name="Player" type="CharacterBody3D"]
collision_layer = 2
script = ExtResource("1_p2x45")

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
mesh = SubResource("CapsuleMesh_pemon")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_jf16n")

[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.59117, 0)

[node name="Pistol" parent="Camera3D" instance=ExtResource("2_ujq2c")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.6, -0.3, -0.6)

[node name="MuzzleFlash" type="GPUParticles3D" parent="Camera3D/Pistol"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000229299, 0.047305, -0.333894)
emitting = false
amount = 1
lifetime = 0.25
one_shot = true
local_coords = true
process_material = SubResource("ParticleProcessMaterial_nrd0t")
draw_pass_1 = SubResource("PlaneMesh_1abfn")

[node name="RayCast3D" type="RayCast3D" parent="Camera3D"]
target_position = Vector3(0, 0, -50)
collision_mask = 2

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "Idle"
playback_default_blend_time = 0.05
libraries = {
"": SubResource("AnimationLibrary_djigl")
}

[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
replication_config = SubResource("SceneReplicationConfig_r56ex")

[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]
